<template>
	<view class="content">
		<view class="content">
			<view class="bgmImg content">
				<image v-if="isPlay" class="playBgm" :src="staticUrl+'/image/detection/fast/icon_bgm_play.png'"
					mode="widthFix" @click="changeMusicStatus()"></image>
				<image v-else :src="staticUrl+'/image/detection/fast/icon_bgm_pause.png'" mode="widthFix"
					@click="changeMusicStatus()"></image>
			</view>

			<view class="brainView">
				<image v-if="adornStateL" class="electrode_up_l"
					:src="staticUrl+'/image/detection/fast/icon_ele_up_l.png'" mode="widthFix"></image>
				<image v-else class="electrode_up_l" :src="staticUrl+'/image/detection/deep/icon_up_L_r.png'"
					mode="widthFix"></image>

				<image v-if="adornStateR" class="electrode_up_r"
					:src="staticUrl+'/image/detection/fast/icon_ele_up_r.png'" mode="widthFix"></image>
				<image v-else class="electrode_up_r" :src="staticUrl+'/image/detection/deep/icon_up_R_r.png'"
					mode="widthFix"></image>

				<image v-if="adornStateL" class="electrode_down_l"
					:src="staticUrl+'/image/detection/fast/icon_ele_down_l.png'" mode="widthFix"></image>
				<image v-else class="electrode_down_l" :src="staticUrl+'/image/detection/deep/icon_down_L_r.png'"
					mode="widthFix"></image>

				<image v-if="adornStateR" class="electrode_down_r"
					:src="staticUrl+'/image/detection/fast/icon_ele_down_r.png'" mode="widthFix"></image>
				<image v-else class="electrode_down_r" :src="staticUrl+'/image/detection/deep/icon_down_R_r.png'"
					mode="widthFix"></image>
			</view>
			<view>
				<image style="width: 663rpx;" :src="staticUrl+'/image/detection/fast/img_body.png'" mode="widthFix">
				</image>
			</view>
			<view class="countDownView content">
				<text>{{ timingText }}</text>
				<text>检测时请尽量保持安静状态</text>
			</view>
			<view class="progressView">
				<ProgressBar :Width="percent" Type="candy" :Vice="false"></ProgressBar>
				<view class="progressDotView content" :style="{left: iconML + 'rpx'}">
					<view class="progressDotView_text">
						<text>{{percent}}%</text>
					</view>
					<image :src="staticUrl+'/image/detection/fast/icon_prgLogo.png'" mode="widthFix"></image>
				</view>
			</view>
		</view>


		<!-- 和头环连接中断 -->
		<uni-popup ref="popup1" :mask-click="false" :safe-area="false" type="dialog">
			<view class="popup1">
				<image class="icon_close" :src="staticUrl+'/image/icon_close.png'" @click="closePopup()"></image>
				<image class="icon_content" :src="staticUrl+'/image/detection/icon_bluetooth.png'"></image>
				<view class="content">
					<text class="popup1Content">连接失败</text>
					<text class="popup1Content">与头环连接中断</text>
				</view>
				<view class="popupBottomView content" @click="closePopup()"><text>我知道了</text></view>
			</view>
		</uni-popup>
		<!-- 是否退出检测 -->
		<uni-popup ref="popup2" :mask-click="false" :safe-area="false" type="dialog">
			<view class="popup1">
				<image class="icon_content" :src="staticUrl+'/image/detection/icon_detection.png'"></image>
				<view class="content">
					<text class="popup1Content">正在检测</text>
					<text class="popup1Content">请问是否需要退出</text>
				</view>
				<view class="popup_bottomView">
					<view class="popup_bottomViewitem content" style="border-radius:0 0 0 15px;" @click="cancel()"><text
							style="color: #333333;">取消</text></view>
					<view class="popup_bottomViewitem content"
						style="background-color: #0659C7;border-radius:0 0 15px 0;" @click="enter()">
						<text style="color: #FFFFFF;">确定</text>
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 是否为本人-->
		<uni-popup ref="isSelfPopup" :mask-click="false" :safe-area="false" type="dialog">
			<view class="popup1">
				<image class="icon_content" :src="staticUrl+'/image/iconPopup/icon_unusual.png'"></image>
				<view class="content">
					<text class="popup1Content">您本次检测数据异常</text>
					<text class="popup1Content">是否为本人佩戴</text>
				</view>
				<view class="popup_bottomView">
					<view class="popup_bottomViewitem content"
						style="border-radius:0 0 0 15px;border-top: solid #BFBFBF;" @click="hasSelf(false)">
						<text style="color: #333333;">否</text>
					</view>
					<view class="popup_bottomViewitem content"
						style="background-color: #FF4D4D;border-radius:0 0 15px 0;" @click="hasSelf(true)">
						<text style="color: #FFFFFF;">是</text>
					</view>
				</view>
			</view>
		</uni-popup>
		<annoyFree-popup ref="annoyPopup" :icon_src="icon_src" @btnEvent="btnEvent"></annoyFree-popup>
	</view>
</template>

<script>
	const app = getApp();
	import * as api from '@/api/login';
	import util from '../../../utils/utils.js';
	import {
		mapState
	} from 'vuex'; //引入mapState
	import ProgressBar from '@/components/Progress-Bar/Progress-Bar';
	import config from "@/config.js"

	// 定义变量 const
	var totaldata = new Array();
	var bloodL = new Array(); //左脑血流数据（500个float长度）
	var bloodR = new Array(); //右脑血流数据（500个float长度）

	export default {
		data() {
			return {
				staticUrl: config.StaticUrl,
				percent: 0,
				isPlay: true,
				timingTimer: null, //正计时器
				showPercentTimer: null, //显示圆环的定时器
				time: 0,
				iconML: -28,
				timingText: '00:00',
				impedanceCount: 0, //阻抗部分的计数器  80
				bloodCount: 0, //计数器  ..判断数组是否组合完成 血流
				maxsize: 8407, //数组的最大长度
				innerAudioContext: null,
				requestReportTime: null, //最后请求报告的定时器
				icon_src: '', //弹窗的图标
				alreadyPopup: false, //断开弹窗是否已经显示
				audioTimer: null, //用于切换音频的定时器
				exceptionType: 0, //异常情况
				checkId: null, //
				unStableCount: 0,
				adornStateL: true,
				adornStateR: true,
				musicSrc: 'https://xch.jseihc.com/public/platform/userApp/static/audio/wechatAudio.mp3', //背景音乐地址
				buildModel:{
					data_l: [],
					data_r: []
				},
				unableTimes: 0, //头环未接触计数器
			};
		},
		components: {
			ProgressBar
		},
		computed: {
			...mapState({
				isConnected: function(state) {
					return state.isConnected;
				}
			})
		},
		// 监听本地数据变化
		watch: {
			// 监听蓝牙连接状态
			isConnected: {
				handler(newValue, oldValue) {
					console.log(newValue);
					if (!newValue) {
						this.$refs.popup1.open('center');
						console.log('蓝牙断开连接了');
					}
				}
			}
		},
		onLoad() {
			this.$toast('请您调整手机音量');
			let that = this;
			uni.$on('originalData', function(data) {
				let array = Array.prototype.slice.call(new Uint8Array(data.msg));
				that.DealMessage(array);
			});
			let music = uni.getStorageSync('backgroundMusic');
			let musicSrc = '';
			if (music == undefined || music == '' || music == 'undefined') {
				// https://xch.jseihc.com/public/platform/userApp/static/audio/fastMonitor/雨后阳光.mp3
				if (app.globalData.platform == "ios") {
					musicSrc = that.$config.StaticUrl + '/audio/fastMonitor/' + encodeURIComponent('雨后阳光.mp3');
				} else {
					musicSrc = that.$config.StaticUrl + '/audio/fastMonitor/雨后阳光.mp3';
				}
			} else {
				if (app.globalData.platform == "ios") {
					music = encodeURIComponent(music)
				}
				musicSrc = that.$config.StaticUrl + '/audio/fastMonitor/' + music;
			}
			this.musicSrc = musicSrc;
			this.resetData();
			let Timer = setTimeout(() => {
				clearTimeout(Timer)
				that.StartMonitor()
			}, 300)
		},
		onShow() {
			uni.setKeepScreenOn({
				keepScreenOn: true
			})
		},
		onHide() {
			uni.setKeepScreenOn({
				keepScreenOn: false
			})
		},
		onUnload() {
			console.log('onUnload');
			let that = this;
			// 销毁音乐实例
			that.innerAudioContext.destroy();
			clearInterval(that.requestReportTime);
			clearInterval(that.showPercentTimer);
			clearInterval(this.timingTimer);
			app.writeBLEState(2)
			// 此处应该emit一个事件 ，如果 头环断开连接了，那么主页的弹窗就不用显示了
			uni.$emit('alreadyPopup', that.alreadyPopup);
			uni.$off('originalData');
		},
		methods: {
			// 开始检测
			StartMonitor: function() {
				let that = this;
				console.log('START');
				this.startTiming();
				app.writeBLEState(1)
				// 定义一个音频
				this.innerAudioContext = uni.createInnerAudioContext();
				this.innerAudioContext.autoplay = false;
				this.innerAudioContext.loop = false;
				this.innerAudioContext.src = this.staticUrl + '/audio/fastMonitorTips/guide.mp3';
				that.innerAudioContext.play();
				this.audioTimer = setTimeout(() => {
					this.innerAudioContext.loop = true;
					that.innerAudioContext.src = that.musicSrc;
					that.innerAudioContext.play();
					clearTimeout(that.audioTimer);
				}, 18000)
			},

			// 开始计时
			startTiming() {
				var that = this;
				this.showPercent()
				let min, sec;
				that.timingTimer = setInterval(() => {
					let count = that.time;
					min = parseInt((count / 60) % 60);
					sec = parseInt(count % 60);
					that.timingText = that.$utils.toDouble(min) + ':' + that.$utils.toDouble(sec);
					that.time++;
					if(that.time === 240) {
						that.checkDataIntegrality()
					}
					if (that.time > 365) {
						that.reCheck();
					}
				}, 1000);
			},
			// 4分钟时，检测数据是否完整
			checkDataIntegrality(){
				if(bloodL.length >= 2100 && bloodR.length >= 2100) {
					this.SendMsg2Server(bloodL,bloodR)
				} else {
					this.reCheck()
				}
			},
			// 显示圆环进度， 2秒钟加一，直到99% ，等待服务器接受到数据
			showPercent() {
				let that = this
				that.showPercentTimer = setInterval(() => {
					if (that.percent <= 98) {
						that.percent++;
					} else if (that.percent == 99) {
						clearInterval(that.showPercentTimer)
					}
					that.iconML = parseInt((that.percent) * 5 - 28)
				}, 1900);
			},
			/**
			 * 数据处理
			 */
			DealMessage(array) {
				let that = this;
				if (array[0] === 0x68 && array[2] === 0x08 && array[3] === 0x06 && array[7] === 0x16) {
					let CrcContent = array.slice(1, 5);
					let crc16 = util.crc16_false(CrcContent);
					if (array[5] === crc16[0] && array[6] === crc16[1]) {
						console.log('电量：' + array[4]);
					}
				} else if (array[0] === 0x68 && array[2] === 0x08 && array[3] === 0x07 && array[7] === 0x16) {
					// 是否佩戴
				} else if (array[0] === 0x68 && array[2] === 0x0f && array[3] === 0x00 && array[14] === 0x16) {
					//阻抗数据  。。。废弃
				} else {
					//血流报文
					that.mergepack(array);
				}
			},
			// 组合报文 血流部分
			async mergepack(blood) {
				let that = this;
				blood.forEach(aBlood => {
					totaldata[that.bloodCount] = aBlood;
					if (that.bloodCount < that.maxsize - 1) {
						that.bloodCount++;
					}
				});
				/*  68 [长度 2]  [功能码 1] [包体 8400] [crc 2] [16]
				 */
				if (that.bloodCount >= that.maxsize - 1) {
					//至此，包组合完成
					let body0 = totaldata.slice(1, 8404);
					let crc16 = util.crc16_false(body0);
					if (totaldata[8404] === crc16[0] && totaldata[8405] === crc16[1]) {
						console.log('crc pass...');
						let decode_front = totaldata.slice(4, 8404);
						let decode_later = util.Data_Decrypt(decode_front, decode_front.length);
						//得到解密后的血流报文（1000字节）
						let unableCount = 0;
						let checkWaveData = []
						let total_last10 = 0
						if (totaldata[3] === 0x01) {
							//左脑血流
							for (let i = 0; i < 2100; i++) {
								let BdataL = decode_later.slice(i * 4, i * 4 + 4).reverse();
								bloodL.push(util.convertFloat(BdataL));
								checkWaveData.push(util.convertFloat(BdataL))
								if (util.convertFloat(BdataL) > 1000 || util.convertFloat(BdataL) < 0) unableCount++;
								if (i > 2090) {
									total_last10 += util.convertFloat(BdataL)
								} else if (i == 2100) {
									let baseImpedance = total_last10 / 10
									if (baseImpedance > 1000 || baseImpedance < 0) {
										that.adornStateL = false
										let t = setTimeout(() => {
											clearTimeout(t)
											that.adornStateL = true
										}, 3000)
									}
								}
							}
							if (unableCount >= 125) {
								unableCount = 0;
								that.$toast('请佩戴好头环', {
									icon: 'error'
								});
								that.unableTimes++
							}
							console.log('血流数据LLL：：：' + bloodL.length);
							let res = await that.checkWave(checkWaveData)
							if(res && !that.$store.state.isBuildModel) that.buildModel.data_l.push(...checkWaveData)
						} else if (totaldata[3] === 0x02) {
							//右脑血流
							for (let i = 0; i < 2100; i++) {
								let BdataR = decode_later.slice(i * 4, i * 4 + 4).reverse();
								bloodR.push(util.convertFloat(BdataR));
								checkWaveData.push(util.convertFloat(BdataR))
								if (util.convertFloat(BdataR) > 1000 || util.convertFloat(BdataR) < 0) unableCount++;
								if (i > 2090) {
									total_last10 += util.convertFloat(BdataR)
								} else if (i == 2100) {
									let baseImpedance = total_last10 / 10
									if (baseImpedance > 1000 || baseImpedance < 0) {
										that.adornStateR = false
										let t = setTimeout(() => {
											clearTimeout(t)
											that.adornStateR = true
										}, 3000)
									}
								}
							}
							if (unableCount >= 125) {
								unableCount = 0;
								that.$toast('请佩戴好头环', {
									icon: 'error'
								});
								that.unableTimes++
							}
							console.log('血流数据RRR：：：' + bloodR.length);
							let res = await that.checkWave(checkWaveData)
							if(res && !that.$store.state.isBuildModel) that.buildModel.data_r.push(...checkWaveData)
						}
						if(!that.$store.state.isBuildModel && that.buildModel.data_l.length == 2100 && that.buildModel.data_r.length == 2100) {
							that.createUserModel()
						}
						if(that.unableTimes >= 3) {
							let innerAudioContext2 = uni.createInnerAudioContext();
							innerAudioContext2.loop = false;
							innerAudioContext2.autoplay = false;
							innerAudioContext2.src = that.staticUrl + '/audio/fastMonitorTips/checkAdorn.mp3'
							innerAudioContext2.play();
							let t = setTimeout(()=>{
								clearTimeout(t)
								innerAudioContext2.destroy()
								app.writeBLEState(2)
							},5500)
						}
						if (bloodL.length === 4200 && bloodR.length === 4200) {
							that.percent == 99
							if(that.unStableCount >= 2) {
								that.reCheck()
							} else {
								that.SendMsg2Server(bloodL,bloodR)
							}
							bloodL = new Array();
							bloodR = new Array();
						}
					}
					that.bloodCount = 0;
					totaldata = new Array();
				}
			},
			//检查波形质量
			checkWave(wave) {
				return new Promise((resolve,reject) =>{
					let that = this;
					let userId = this.$store.state.userInfo.currentUser.userId;
					let data = {
						userId,
						action: 'checkWave',
						params: {
							wave,
							frequency: 50
						}
					};
					api.checkWave(data).then(function(res) {
						console.log('checkWave success', res);
						if(res.data.success) {
							let waveQuality = res.data.data.waveQuality
							if (waveQuality < 0.1) {
								that.$toast('数据不稳定,请务必保持稳定')
								that.unStableCount++
								let innerAudioContext2 = uni.createInnerAudioContext();
								innerAudioContext2.loop = false;
								innerAudioContext2.autoplay = false;
								innerAudioContext2.src = that.staticUrl + '/audio/fastMonitorTips/dataException.mp3'
								innerAudioContext2.play();
								let t = setTimeout(()=>{
									clearTimeout(t)
									innerAudioContext2.destroy()
									that.innerAudioContext.play()
								},4500)
							} else if (waveQuality < 0.4) {
								that.$toast('请保持安静继续检测')
							}
							resolve(true)
						} else {
							resolve(false)
						}
					}).catch(function(error) {
						console.log('checkWave fail', error);
					});
				})
			},
			createUserModel() {
				return new Promise((resolve,reject) =>{
					let that = this;
					let userId = this.$store.state.userInfo.currentUser.userId;
					let data = {
						userId,
						action: 'createUserModel',
						params: {
							left: this.buildModel.data_l,
							right: this.buildModel.data_r
						}
					};
					api.createUserModel(data).then(function(res) {
							console.log('createUserModel success', res);
							that.$store.commit('isBuildModel',res.data.success)
							if(res.data.success) {
								resolve(true)
							}else {
								resolve(false)
							}
						}).catch(function(error) {
							console.log('createUserModel fail', error);
							reject(false)
						});
				})
			},
			// 发送消息给服务器
			SendMsg2Server(waveL, waveR) {
				console.log('send to server...');
				let left1 = waveL.slice(0, waveL.length / 2)
				let left2 = waveL.slice(waveL.length / 2, waveL.length)
				let right1 = waveR.slice(0, waveR.length / 2)
				let right2 = waveR.slice(waveR.length / 2, waveR.length)
				let that = this;
				let userId = this.$store.state.userInfo.currentUser.userId;
				let data = {
					userId,
					action: 'fastCheck',
					params: {
						left: [left1, left2],
						right: [right1, right2]
					}
				};
				api.fastCheck(data).then(function(res) {
					console.log('res success', res);
					if (res.data.success) {
						// stable 0.3 that.reCheck()   parameter
						that.fastCheckResult = res.data.data.fastCheckResult
						app.writeBLEState(2)
						if (res.data.data.fastCheckResult.stable > 0.5) {
							that.$refs.isSelfPopup.open('center');
						} else {
							that.saveReport()
						}
					} else {
						if (res.data.data.state == '数据异常') {
							that.reCheck();
						}
					}
				}).catch(function(error) {
					console.log('fastCheck fail', error);
				});
			},
			// 确认是否是本人
			hasSelf(flag) {
				this.$refs.isSelfPopup.close();
				if (flag) {
					this.saveReport()
				} else {
					uni.switchTab({
						url: '../detection'
					});
				}
			},
			// 告知服务器 保存数据
			saveReport() {
				let that = this;
				let userId = this.$store.state.userInfo.currentUser.userId;
				let data = {
					userId,
					action: 'saveReport',
					params: that.fastCheckResult
				};
				api.saveReport(data).then(function(res) {
					console.log('saveReport success', res);
					if (res.data.success) {
						that.$store.commit('isLoopCheckConnectState',true)
						uni.redirectTo({
							url: '../fastReport/fastReport?report=' + JSON.stringify(that.fastCheckResult
								.report) + '&isHistory=' + false
						})
					}
				}).catch(function(error) {
					console.log('saveReport fail', error);
				});
			},
			/*
			 * 停止蓝牙发送数据
			 * 音乐停止
			 * */
			reCheck() {
				console.log('recheck...');
				app.writeBLEState(2)
				clearInterval(this.timingTimer);
				clearInterval(this.showPercentTimer)
				this.innerAudioContext.stop();
				this.percent = 0;
				this.time = 0;
				this.timingText = '00:00';
				let content = {
					text1: '请您调整头环',
					text2: '保持安静',
					text3: '重新开始检测',
					btn_text: '重新检测'
				};
				this.icon_src = this.$config.staticUrl +'/image/iconPopup/icon_quiet.png';
				this.$refs.annoyPopup.openPopup(content, 'center');
				this.innerAudioContext.loop = false;
				this.playAudio(this.$config.staticUrl + '/audio/fastMonitorTips/reMonitor.mp3');
			},
			playAudio(src) {
				this.innerAudioContext.src = src;
				this.innerAudioContext.play();
			},
			btnEvent(e) {
				this.innerAudioContext.loop = true;
				this.playAudio(this.musicSrc);
				this.$refs.annoyPopup.closePopup();
				this.resetData();
				app.writeBLEState(1)
				this.startTiming();
			},
			// 关闭弹出层
			closePopup() {
				this.alreadyPopup = true;
				this.$refs.popup1.close();
				uni.switchTab({
					url: '../detection'
				});
			},
			// 关闭 / 打开音乐
			changeMusicStatus: function() {
				this.isPlay = !this.isPlay
				// this.innerAudioContext.stop();
				if (this.isPlay) {
					if (this.time < 18) this.innerAudioContext.seek(this.time);
					this.innerAudioContext.play()
				} else {
					this.innerAudioContext.onPause(function(res) {
						console.log('音乐结束了');
					});
					this.innerAudioContext.pause()
				}
			},
			// 取消tuichu
			cancel() {
				this.$refs.popup2.close();
			},
			onBackPress(options) {
				let that = this;
				that.$refs.popup2.open('center');
				return true;
			},
			// 确定tuichu
			enter() {
				let that = this;
				// send停止检测报文
				app.writeBLEState(2)
				// 销毁音乐实例
				that.innerAudioContext.destroy();
				// #ifndef MP-WEIXIN
				uni.switchTab({
					url: '../detection'
				});
				// #endif
			},
			// #ifdef MP-WEIXIN
			// 判断是否开始检测，状态位
			enableAlertBeforeUnload() {
				console.log('监听小程序返回事件');
				let that = this;
				// if(this.isStart){
				wx.enableAlertBeforeUnload({
					message: '您确定退出此次检测?',
					success: function(res) {
						console.log('返回');
					},
					fail: function(err) {
						console.log('取消!');
					}
				});
				// }
			},
			// #endif
			// 重置所有数据
			resetData() {
				this.percent = 0;
				totaldata = new Array();
				bloodL = new Array(); //左脑血流数据（500个float长度）
				bloodR = new Array(); //右脑血流数据（500个float长度）
			}
		}
	};
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.bgmImg {
		margin-top: 40rpx;
		width: 670rpx;
		align-items: flex-end;
	}

	.bgmImg image {
		width: 56rpx;
		height: 56rpx;
	}

	.playBgm {
		animation: bgmImg 5s linear infinite;
	}

	@keyframes bgmImg {
		0% {
			transform: rotate(0deg);
		}

		100% {
			transform: rotate(360deg);
		}
	}

	.brainView {
		margin-top: 50rpx;
		width: 280rpx;
		height: 331rpx;
		position: relative;
		background-image: url('https://xch.jseihc.com/public/platform/userApp/static/image/detection/fast/img_brain.png');
		background-size: 100% 100%;
		justify-content: flex-start;
	}

	:root {
		--margin_border: 0rpx;
	}

	.electrode_up_l {
		position: absolute;
		top: 110rpx;
		left: var(--margin_border);
		width: 15rpx;
	}

	.electrode_up_r {
		position: absolute;
		top: 110rpx;
		right: 0;
		width: 15rpx;
	}

	.electrode_down_l {
		position: absolute;
		bottom: 42rpx;
		left: 28rpx;
		width: 21rpx;
	}

	.electrode_down_r {
		position: absolute;
		bottom: 42rpx;
		right: 28rpx;
		width: 21rpx;
	}

	.countDownView text:nth-child(1) {
		margin-top: 50rpx;
		font-size: 80rpx;
		font-weight: bold;
		color: #0659c7;
	}

	.countDownView text:nth-child(2) {
		margin-top: 30rpx;
		font-size: 28rpx;
		font-weight: normal;
		color: #0659c7;
	}

	.progressView {
		position: relative;
		margin-top: 100rpx;
		width: 500rpx;
	}

	.progressDotView {
		position: absolute;
		top: -46rpx;
		z-index: 10;
	}

	.progressDotView_text {
		width: 56rpx;
		height: 34rpx;
		background-image: url('https://xch.jseihc.com/public/platform/userApp/static/image/detection/fast/icon_prgBg.png');
		background-size: 100% 100%;
		display: flex;
		align-items: flex-start;
		justify-content: center;
	}

	.progressDotView_text text {
		/* margin-top: 2rpx; */
		color: #fff;
		font-size: 20rpx;
	}

	.progressDotView image {
		margin-top: 3rpx;
		width: 56rpx;
	}

	/* 弹窗 */

	.popup1 {
		width: 620rpx;
		height: 750rpx;
		background-color: white;
		border-radius: 15px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;
	}

	.icon_content {
		margin-top: 93rpx;
		width: 238rpx;
		height: 238rpx;
	}

	.popup1Content {
		margin-top: 20rpx;
		font-size: 52rpx;
		font-family: Source Han Sans CN;
		font-weight: normal;
		color: #333333;
	}

	/* popup 底部两个按钮区域 */
	.popup_bottomView {
		width: 100%;
		height: 137rpx;
		border-top: #333333;
		/* border: 1px #323233 solid; */
		border-radius: 0 0 15px 15px;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.popup_bottomViewitem {
		width: 50%;
		height: 100%;
		font-size: 44rpx;
		font-family: Source Han Sans CN;
		font-weight: normal;
	}

	.icon_close {
		width: 40rpx;
		height: 40rpx;
		position: absolute;
		top: 26rpx;
		right: 35rpx;
	}

	.popupBottomView {
		margin-bottom: 0rpx;
		width: 100%;
		height: 120rpx;
		border-radius: 0 0 15px 15px;
		background-color: #0659c7;
	}

	.popupBottomView text {
		font-size: 44rpx;
		font-family: Source Han Sans CN;
		font-weight: normal;
		color: #ffffff;
	}
</style>